const HtmlWebPackPlugin = require("html-webpack-plugin");
var path = require('path');

module.exports = {
	mode: 'development',
	entry: './src/js/ImageWall.js',
	output: {
		path: path.resolve(__dirname, 'dist'),
		filename: 'ImageWall.bundle.js'
	},
	module: {
		rules: [ // 规则这里，配置不同文件类型的loader
			{
				test: /\.html$/,
				use: [{
					loader: "html-loader",
					options: {
						minimize: true
					}
				}]
			}
		]
	},
	plugins: [
		new HtmlWebPackPlugin({
			template: "./src/index.html",
			filename: "./index.html"
		})
	]
}